package cn.wolfcode.luowowo.common.util;

import lombok.Getter;


@Getter
public enum  KeysUtil {
    VERIFY_CODE("verify_code",30L),//验证码
    USER_LOGIN_TOKEN("user_login_token",30L), //登录token

    STRATEGY_STATIS_VO("strategy_statis_vo"),//攻略统计
    USER_STRATERY_STATIS_FAVOR("user_stratery_statis_favor"),//用户收藏的攻略
    STRATERY_STATIS_THUMBSUPNUM("stratery_statis_thumbsupnum"),//攻略点赞数

    INLAND_STRATERY_STATIS_COMMEND_SORT("inland_stratery_statis_commend_sort"),//攻略国内推荐排序
    FOREIGN_STRATERY_STATIS_COMMEND_SORT("foreign_stratery_statis_commend_sort"),//攻略国外推荐排序
    STRATERY_STATIS_HOT_COMMEND_SORT("stratery_statis_hot_commend_sort"),//热门攻略推荐排行

    TRAVEL_STATIS_VO("travel_statis_vo"),//游记统计
    USER_TRAVEL_STATIS_FAVOR("user_travel_statis_favor"),//用户收藏的游记
    TRAVEL_STATIS_THUMBSUPNUM("travel_statis_thumbsupnum");//游记点赞数


    private String name;
    private Long time;

    KeysUtil(String name) {
        this.name = name;
    }

    KeysUtil(String name, Long time) {
        this.name = name;
        this.time = time;
    }

    public String join(String...keys){
        StringBuffer buffer = new StringBuffer(10);
        buffer.append(this.getName());
        for (String key : keys) {
            buffer.append(":").append(key);
        }
        return buffer.toString();
    }
}
